#ifndef ObjFloat_First
#define ObjFloat_First
#ifdef __GNUG__
#pragma interface
#endif

#include "Object.h"

//---- ObjFloat ----------------------------------------------------------------

class ObjFloat: public Object {
public:
	MetaDef(ObjFloat);

	ObjFloat();
	ObjFloat(double v);

	double GetValue();
	double SetValue(double newval);
	double operator= (double newval);
	operator double();

	//---- comparing
	u_long Hash();
	bool IsEqual(Object*);
	int Compare(Object*);

	//---- converting
	const char *AsString();

	//---- activation passivation
	OStream &PrintOn(OStream&);
	IStream &ReadFrom(IStream&);
	
protected:
	double val;
};

inline ObjFloat::ObjFloat()
	{ val= 0.0; }
inline ObjFloat::ObjFloat(double v)
	{ val= v; }
inline double ObjFloat::GetValue()
	{ return val; }
inline double ObjFloat::SetValue(double newval)
	{ val= newval; Changed(); return val; }
inline double ObjFloat::operator= (double newval)
	{ return SetValue(newval); }
inline ObjFloat::operator double()
	{ return val; }

#endif

